package com.zw.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zw.common.to.member.MemberUserLoginTO;
import com.zw.common.to.member.MemberUserRegisterTO;
import com.zw.common.to.member.WBSocialUserTO;
import com.zw.common.utils.PageUtils;
import com.zw.gulimall.member.entity.MemberEntity;
import com.zw.gulimall.member.exception.PhoneException;
import com.zw.gulimall.member.exception.UsernameException;

import java.util.Map;

/**
 * 会员
 *
 * @author zw
 * @email Alisinngai@gmail.com
 * @date 2023-06-12 00:25:23
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    MemberEntity login(MemberUserLoginTO user);

    MemberEntity login(WBSocialUserTO user);

    void regist(MemberUserRegisterTO user);

    /**
     * 校验手机号是否唯一
     */
    void checkPhoneUnique(String phone) throws PhoneException;

    /**
     * 校验用户名是否唯一
     */
    void checkUserNameUnique(String userName) throws UsernameException;
}

